#ifndef TST_LIGHTCONTROLENGINETEST_H
#define TST_LIGHTCONTROLENGINETEST_H

#include <QObject>

class IF_LightEngineInterface;
class LightPresetModel;
class MockLightTransitionEngine;
class ActionListController;


class LightControlEngineTest : public QObject
{
   Q_OBJECT
public:
   explicit LightControlEngineTest(QObject *parent = 0);

public slots:
    void init();
    void cleanup();

private Q_SLOTS:
    /**
     * @brief show how to allocate ::LightControlEngine object
     */
    void creation();
    /**
     * @brief use case of adding a new preset
     */
    void createNewPreset();
    /**
     * @brief modify a preset whose data are alreay there
     */
    void updateExistingPreset();
    /**
     * @brief request from outside to start DMX service, with successful result.
     *    Lower level DMX must be started and a signal must be sent (for GUIs).
     */
    void startDmxService();
    /**
     * @brief try to start DMX service but it doesn't work
     */
    void startDmxServiceFailure();
    /**
     * @brief request from outside to stop DMX service.
     *    Lower level DMX must be shout off and a signal must be sent
     */
    void stopDmxService();
    /**
     * @brief activation of a preset, given its name label
     */
    void activateByLabel();
    /**
     * @brief try to activate an unexisting preset (by label)
     */
    void activateUnexistingLabel();
    /**
     * @brief simulate a variation of lightset during transition and
     *   check that Light Control Engine emits a notification
     */
    void transitionNotification();
    /**
     * @brief use case of erasing a (valid) existing preset
     */
    void deleteExistingPreset();
    /**
     * @brief try to delete a preset that does not exist
     */
    void deleteInvalidPreset();
    /**
     * @brief a value for a channel is set from outside, for example
     *   from the GUI
     */
    void setValueFromGUI();
    /**
     * @brief try to set a value for an invalid channel.
     *    Nothign should happen.
     */
    void accessInvalidChannel();
    /**
     * @brief an external module gets the data needed to show a valid preset
     */
    void retrieveDataForOne();
    /**
     * @brief retrieve all presets from the model
     */
    void retrieveAllData();

private:
    IF_LightEngineInterface  *m_lightEngine;
    LightPresetModel  *m_presetModel;
    MockLightTransitionEngine  *m_mockTransitionEngine;
    ActionListController *m_controller;
};

#endif // TST_LIGHTCONTROLENGINETEST_H
